package cn.geminis.warehouse.service.basic.entity;

import cn.geminis.lowcode.annotation.*;
import com.alibaba.excel.annotation.ExcelProperty;
import jakarta.persistence.Column;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;


@Getter
@Setter
@UuidEntity(idFieldAnnotations = {"com.alibaba.excel.annotation.ExcelIgnore"})
@SoftDeleteEntity(deleteFieldAnnotations = {"com.alibaba.excel.annotation.ExcelIgnore"})
@QueryFilter
@CrudRepository
@CrudController
@ExcelController
public class Transporter {

    @Column(nullable = false)
    @ExcelProperty("牌照号")
    @QueryFilterProperty(filterType = QueryFilterProperty.FilterType.Like, valueFormat = "%%%s%%")
    private String no;

    @Column(nullable = false)
    @ExcelProperty("承运商")
    @QueryFilterProperty(filterType = QueryFilterProperty.FilterType.Like, valueFormat = "%%%s%%")
    private String company;

    @Column(nullable = false)
    @ExcelProperty("类型")
    @QueryFilterProperty(filterType = QueryFilterProperty.FilterType.Like, valueFormat = "%%%s%%")
    private String type;

    @Column(nullable = false)
    @ExcelProperty("重量")
    private int weight;

    @Column(nullable = false)
    @ExcelProperty("载重量")
    private int carryLoad;

    @Column(nullable = false)
    @ExcelProperty("宽度")
    private double width;

    @Column(nullable = false)
    @ExcelProperty("长度")
    private double length;

    @Column(nullable = false)
    @ExcelProperty("高度")
    private double height;

    @Column(nullable = false)
    @ExcelProperty("驾驶员")
    @QueryFilterProperty(filterType = QueryFilterProperty.FilterType.Like, valueFormat = "%%%s%%")
    private String driver;

    @Column(nullable = false)
    @ExcelProperty("联系电话")
    @QueryFilterProperty(filterType = QueryFilterProperty.FilterType.Like, valueFormat = "%%%s%%")
    private String phone;

    @Column(nullable = false)
    @ExcelProperty("运价")
    private BigDecimal price;
}
